<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.18"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>embedme: src/DateTime.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">embedme
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">DateTime.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_date_time_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/******************************************************************************</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This file is part of libemb.</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * libemb is free software: you can redistribute it and/or modify</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * it under the terms of the GNU General Public License as published by</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * the Free Software Foundation, either version 3 of the License, or</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * (at your option) any later version.</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * libemb is distributed in the hope that it will be useful,</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * GNU General Public License for more details.</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * You should have received a copy of the GNU General Public License</span></div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * along with libemb.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * Project: Embedme</span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * Author : FergusZeng</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * Email  : cblock@126.com</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * git    : https://gitee.com/newgolo/embedme.git</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * Copyright 2014~2020 @ ShenZhen ,China</span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment">*******************************************************************************/</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#ifndef __DATETIME_H__</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#define __DATETIME_H__</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_base_type_8h.html">BaseType.h</a>&quot;</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;iostream&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="keyword">namespace </span>libemb{</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160; </div>
<div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="classlibemb_1_1_time.html">   39</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_time.html">Time</a>{</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="keyword">public</span>: </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <a class="code" href="classlibemb_1_1_time.html">Time</a>();</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <a class="code" href="classlibemb_1_1_time.html">Time</a>(<span class="keywordtype">int</span> sec,<span class="keywordtype">int</span> us);</div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="classlibemb_1_1_time.html">Time</a>();</div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_time.html#a228878c8d763ce96ddbaeaa4026fc4ea">secondPart</a>();</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_time.html#ab73161929bd3c031a0c83dbdb64969ec">microSecondPart</a>();</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    std::string <a class="code" href="classlibemb_1_1_time.html#afe080ee72473e1d9bee1649d92b2c84f">toString</a>();</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    <span class="keywordtype">long</span> <span class="keywordtype">long</span> <a class="code" href="classlibemb_1_1_time.html#ad81d9ea2672c3ff82dce73ab414ffedd">toMicroSeconds</a>();</div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    <span class="keyword">static</span> <a class="code" href="classlibemb_1_1_time.html">Time</a> <a class="code" href="classlibemb_1_1_time.html#a2ba57b58ddd4d78a8a9f1af9e688d895">currentTimeFromEpoch</a>();</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;    <span class="keyword">static</span> <a class="code" href="classlibemb_1_1_time.html">Time</a> <a class="code" href="classlibemb_1_1_time.html#a201aaffe9381aa0da6359f135d6bbecd">currentTimeMonotonic</a>();</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_time.html#a2f4cb755f2ecc129a570d0b3d1b42998">usIntervalMonotonic</a>(<a class="code" href="classlibemb_1_1_time.html">Time</a>&amp; monoStartTime);</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <a class="code" href="classlibemb_1_1_time.html">Time</a> operator +(<span class="keyword">const</span> <a class="code" href="classlibemb_1_1_time.html">Time</a> &amp;t);</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <a class="code" href="classlibemb_1_1_time.html">Time</a> operator -(<span class="keyword">const</span> <a class="code" href="classlibemb_1_1_time.html">Time</a> &amp;t);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;    </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    <span class="keywordtype">int</span> m_seconds{0};</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    <span class="keywordtype">int</span> m_microSeconds{0};</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;};</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classlibemb_1_1_date_time.html">   92</a></span>&#160;<span class="keyword">class </span><a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>{</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>();</div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a270cc1c1fc63d422b73852f929e54202">year</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a50fe8ad75acaa7e3930c5776c616e341">month</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2246c1851c764a89fb8b29053e17790f">day</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a18956ae352ce30d5d6072034a9dc82a3">hour</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a3a92698754d317fe3ee31e6fe8eab7ea">minute</a>,<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2cd3a235829187807969ba9b0a2aa56d">second</a>);</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>(<span class="keyword">const</span> <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; copy);</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    ~<a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>();</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a270cc1c1fc63d422b73852f929e54202">year</a>();</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a50fe8ad75acaa7e3930c5776c616e341">month</a>();</div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2246c1851c764a89fb8b29053e17790f">day</a>();</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a18956ae352ce30d5d6072034a9dc82a3">hour</a>();</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a3a92698754d317fe3ee31e6fe8eab7ea">minute</a>();</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2cd3a235829187807969ba9b0a2aa56d">second</a>();</div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2482b31528d6e25e5a648d2b15eb3e4f">msecond</a>();</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2850ecf96122706602832c2c2a351875">weekday</a>();</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#a464672eb7ded0276bcdef5226f8a64d1">setYear</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a270cc1c1fc63d422b73852f929e54202">year</a>);</div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#a2c26e1a100b3ff736353c75a81a62ccd">setMonth</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a50fe8ad75acaa7e3930c5776c616e341">month</a>);</div>
<div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#af1cb1bc2c322fca013b55ab1c6842fa5">setDay</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> date);</div>
<div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#aa59750c9bd81d9e8484d32101aecd9ba">setHour</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a18956ae352ce30d5d6072034a9dc82a3">hour</a>);</div>
<div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#afcf96bdbab200186b142cfa73776fcfe">setMinute</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a3a92698754d317fe3ee31e6fe8eab7ea">minute</a>);</div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#af10df424bc3a08da8e7d3c024de021a6">setSecond</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classlibemb_1_1_date_time.html#a2cd3a235829187807969ba9b0a2aa56d">second</a>);</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;    <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; <a class="code" href="classlibemb_1_1_date_time.html#a976357aa9b2fca3b8084b8c8cea30e62">setMSecond</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> microSec);</div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    std::string <a class="code" href="classlibemb_1_1_date_time.html#a205a901c68cf86d03c252b20f640f2f5">toString</a>();</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_date_time.html#a5086b585b748c4b7164f478664e1de4a">isLeapYear</a>();</div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <span class="keyword">static</span> <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a> <a class="code" href="classlibemb_1_1_date_time.html#a611c6125b419acda633c512b54b5dfb1">currentDateTime</a>();</div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_date_time.html#ac41971dbd8b7b2ff813a8b9f6a8dd3c7">setCurrentDateTime</a>(<a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; dateTime);</div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keyword">static</span> <a class="code" href="classlibemb_1_1_date_time.html">DateTime</a> <a class="code" href="classlibemb_1_1_date_time.html#acdc7b88ac07862e9a3391427568f2875">getRTCDateTime</a>();</div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classlibemb_1_1_date_time.html#a950cd35e4adef9dd7faad1a56e777073">setRTCDateTime</a>(<a class="code" href="classlibemb_1_1_date_time.html">DateTime</a>&amp; dateTime);</div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;<span class="keyword">private</span>:</div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_msecond{0};</div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_second{0};   </div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_minute{0};   </div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_hour{0};     </div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_day{1};     </div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_month{1};    </div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> m_year{2000};     </div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;};</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;}</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;<span class="preprocessor">#endif</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a950cd35e4adef9dd7faad1a56e777073"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a950cd35e4adef9dd7faad1a56e777073">libemb::DateTime::setRTCDateTime</a></div><div class="ttdeci">static bool setRTCDateTime(DateTime &amp;dateTime)</div><div class="ttdoc">设置RTC时间</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:381</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_a2f4cb755f2ecc129a570d0b3d1b42998"><div class="ttname"><a href="classlibemb_1_1_time.html#a2f4cb755f2ecc129a570d0b3d1b42998">libemb::Time::usIntervalMonotonic</a></div><div class="ttdeci">static int usIntervalMonotonic(Time &amp;monoStartTime)</div><div class="ttdoc">获取时间间隔</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:100</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html"><div class="ttname"><a href="classlibemb_1_1_time.html">libemb::Time</a></div><div class="ttdoc">时间类</div><div class="ttdef"><b>Definition:</b> DateTime.h:39</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_af1cb1bc2c322fca013b55ab1c6842fa5"><div class="ttname"><a href="classlibemb_1_1_date_time.html#af1cb1bc2c322fca013b55ab1c6842fa5">libemb::DateTime::setDay</a></div><div class="ttdeci">DateTime &amp; setDay(unsigned int date)</div><div class="ttdoc">设置日期</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:243</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_a201aaffe9381aa0da6359f135d6bbecd"><div class="ttname"><a href="classlibemb_1_1_time.html#a201aaffe9381aa0da6359f135d6bbecd">libemb::Time::currentTimeMonotonic</a></div><div class="ttdeci">static Time currentTimeMonotonic()</div><div class="ttdoc">当前时间(从系统开机的时刻算起)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:90</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_afcf96bdbab200186b142cfa73776fcfe"><div class="ttname"><a href="classlibemb_1_1_date_time.html#afcf96bdbab200186b142cfa73776fcfe">libemb::DateTime::setMinute</a></div><div class="ttdeci">DateTime &amp; setMinute(unsigned int minute)</div><div class="ttdoc">设置分钟</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:259</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html"><div class="ttname"><a href="classlibemb_1_1_date_time.html">libemb::DateTime</a></div><div class="ttdoc">日期时间结构体</div><div class="ttdef"><b>Definition:</b> DateTime.h:92</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a2850ecf96122706602832c2c2a351875"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a2850ecf96122706602832c2c2a351875">libemb::DateTime::weekday</a></div><div class="ttdeci">unsigned int weekday()</div><div class="ttdoc">星期(0~6:星期日~星期六)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:192</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a464672eb7ded0276bcdef5226f8a64d1"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a464672eb7ded0276bcdef5226f8a64d1">libemb::DateTime::setYear</a></div><div class="ttdeci">DateTime &amp; setYear(unsigned int year)</div><div class="ttdoc">设置年份</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:227</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_acdc7b88ac07862e9a3391427568f2875"><div class="ttname"><a href="classlibemb_1_1_date_time.html#acdc7b88ac07862e9a3391427568f2875">libemb::DateTime::getRTCDateTime</a></div><div class="ttdeci">static DateTime getRTCDateTime()</div><div class="ttdoc">获取RTC时间</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:350</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_aa59750c9bd81d9e8484d32101aecd9ba"><div class="ttname"><a href="classlibemb_1_1_date_time.html#aa59750c9bd81d9e8484d32101aecd9ba">libemb::DateTime::setHour</a></div><div class="ttdeci">DateTime &amp; setHour(unsigned int hour)</div><div class="ttdoc">设置小时</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:251</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_afe080ee72473e1d9bee1649d92b2c84f"><div class="ttname"><a href="classlibemb_1_1_time.html#afe080ee72473e1d9bee1649d92b2c84f">libemb::Time::toString</a></div><div class="ttdeci">std::string toString()</div><div class="ttdoc">时间转换成字符串</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:69</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a976357aa9b2fca3b8084b8c8cea30e62"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a976357aa9b2fca3b8084b8c8cea30e62">libemb::DateTime::setMSecond</a></div><div class="ttdeci">DateTime &amp; setMSecond(unsigned int microSec)</div><div class="ttdoc">设置毫秒数</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:276</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_af10df424bc3a08da8e7d3c024de021a6"><div class="ttname"><a href="classlibemb_1_1_date_time.html#af10df424bc3a08da8e7d3c024de021a6">libemb::DateTime::setSecond</a></div><div class="ttdeci">DateTime &amp; setSecond(unsigned int second)</div><div class="ttdoc">设置秒数</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:267</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a5086b585b748c4b7164f478664e1de4a"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a5086b585b748c4b7164f478664e1de4a">libemb::DateTime::isLeapYear</a></div><div class="ttdeci">bool isLeapYear()</div><div class="ttdoc">判断是否是润年</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:290</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_ad81d9ea2672c3ff82dce73ab414ffedd"><div class="ttname"><a href="classlibemb_1_1_time.html#ad81d9ea2672c3ff82dce73ab414ffedd">libemb::Time::toMicroSeconds</a></div><div class="ttdeci">long long toMicroSeconds()</div><div class="ttdoc">转换成微秒数</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:74</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_ac41971dbd8b7b2ff813a8b9f6a8dd3c7"><div class="ttname"><a href="classlibemb_1_1_date_time.html#ac41971dbd8b7b2ff813a8b9f6a8dd3c7">libemb::DateTime::setCurrentDateTime</a></div><div class="ttdeci">static bool setCurrentDateTime(DateTime &amp;dateTime)</div><div class="ttdoc">设置当前时间</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:317</div></div>
<div class="ttc" id="a_base_type_8h_html"><div class="ttname"><a href="_base_type_8h.html">BaseType.h</a></div><div class="ttdoc">基础类型头文件</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a2cd3a235829187807969ba9b0a2aa56d"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a2cd3a235829187807969ba9b0a2aa56d">libemb::DateTime::second</a></div><div class="ttdeci">unsigned int second()</div><div class="ttdoc">秒(0~59)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:182</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a2c26e1a100b3ff736353c75a81a62ccd"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a2c26e1a100b3ff736353c75a81a62ccd">libemb::DateTime::setMonth</a></div><div class="ttdeci">DateTime &amp; setMonth(unsigned int month)</div><div class="ttdoc">设置月份</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:235</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a205a901c68cf86d03c252b20f640f2f5"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a205a901c68cf86d03c252b20f640f2f5">libemb::DateTime::toString</a></div><div class="ttdeci">std::string toString()</div><div class="ttdoc">转换为字符串格式:&quot;yyyy-mm-dd hh:MM:ss&quot;</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:285</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a611c6125b419acda633c512b54b5dfb1"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a611c6125b419acda633c512b54b5dfb1">libemb::DateTime::currentDateTime</a></div><div class="ttdeci">static DateTime currentDateTime()</div><div class="ttdoc">获取当前日期时间</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:301</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a3a92698754d317fe3ee31e6fe8eab7ea"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a3a92698754d317fe3ee31e6fe8eab7ea">libemb::DateTime::minute</a></div><div class="ttdeci">unsigned int minute()</div><div class="ttdoc">分钟(0~59)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:178</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_a228878c8d763ce96ddbaeaa4026fc4ea"><div class="ttname"><a href="classlibemb_1_1_time.html#a228878c8d763ce96ddbaeaa4026fc4ea">libemb::Time::secondPart</a></div><div class="ttdeci">int secondPart()</div><div class="ttdoc">获取秒数</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:59</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a2482b31528d6e25e5a648d2b15eb3e4f"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a2482b31528d6e25e5a648d2b15eb3e4f">libemb::DateTime::msecond</a></div><div class="ttdeci">unsigned int msecond()</div><div class="ttdoc">毫秒(0~999)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:187</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a270cc1c1fc63d422b73852f929e54202"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a270cc1c1fc63d422b73852f929e54202">libemb::DateTime::year</a></div><div class="ttdeci">unsigned int year()</div><div class="ttdoc">年份(0~9999)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:161</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a50fe8ad75acaa7e3930c5776c616e341"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a50fe8ad75acaa7e3930c5776c616e341">libemb::DateTime::month</a></div><div class="ttdeci">unsigned int month()</div><div class="ttdoc">月份(1~12)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:166</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a2246c1851c764a89fb8b29053e17790f"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a2246c1851c764a89fb8b29053e17790f">libemb::DateTime::day</a></div><div class="ttdeci">unsigned int day()</div><div class="ttdoc">日期(1~31)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:170</div></div>
<div class="ttc" id="aclasslibemb_1_1_date_time_html_a18956ae352ce30d5d6072034a9dc82a3"><div class="ttname"><a href="classlibemb_1_1_date_time.html#a18956ae352ce30d5d6072034a9dc82a3">libemb::DateTime::hour</a></div><div class="ttdeci">unsigned int hour()</div><div class="ttdoc">小时(0~23)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:174</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_ab73161929bd3c031a0c83dbdb64969ec"><div class="ttname"><a href="classlibemb_1_1_time.html#ab73161929bd3c031a0c83dbdb64969ec">libemb::Time::microSecondPart</a></div><div class="ttdeci">int microSecondPart()</div><div class="ttdoc">获取微秒数</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:64</div></div>
<div class="ttc" id="aclasslibemb_1_1_time_html_a2ba57b58ddd4d78a8a9f1af9e688d895"><div class="ttname"><a href="classlibemb_1_1_time.html#a2ba57b58ddd4d78a8a9f1af9e688d895">libemb::Time::currentTimeFromEpoch</a></div><div class="ttdeci">static Time currentTimeFromEpoch()</div><div class="ttdoc">当前时间(从1970-01-01 00:00:00 UTC开始)</div><div class="ttdef"><b>Definition:</b> DateTime.cpp:80</div></div>
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
</html>
